import request from '@/utils/request'

//初始化租客页面
export function init(){
  return request({
    url:'guests/init',
    method:'get'
  })
}

//获取租客列表
export function getList(params) {
  return request({
    url: 'guests/getGuests',
    method: 'post',
    params
  })
}

/**
 * 保存修改的租客
 * @param guest
 * @returns {AxiosPromise}
 */
export function saveGuest(guest){
  return request({
    url:'guests/saveGuest',
    method:'post',
    data:guest
  })
}

/**
 * 添加租客信息
 * @param guest
 * @returns {AxiosPromise}
 */
export function addGuest(guest){
  return request({
    url:'/guests/addGuest',
    method:'post',
    data:guest
  })
}

/**
 * 批量删除租客
 * @param guests
 * @returns {AxiosPromise}
 */
export function deleteGuests(guests){
  return request({
    url:'guests/deleteGuests',
    method:'post',
    data:guests
  })
}
